<template>
  <div class="">
  	<div class="successImg text-center">
  		<img src="/static/wechat/images/success@2x.png" alt="">
  	</div>
    <div class="successTip text-center">
      申请加盟成功！我们将尽快与你联系<br>
      您也可以拨打下方专属客服电话联系我们
    </div>
    <button class="button" @click='goToFindJob()'>看看工作</button>
    <a :href="telInfo" class="service">
      <img src="/static/wechat/images/service.png" alt="">
    </a>
  </div>
</template>
<script>
  import {getBrokers} from'@/controller'
  export default {
    name: 'successfulCopSign',
    data () {
      return {
        msg: 'successfulCopSign',
        telInfo: ''
      }
    },
    methods:{
     goToFindJob(){
        this.$router.push({
          path:`/`
        })
      },
    },
    mounted(){
      let myAgentTel = localStorage.getItem('myAgentTel')
      if(!myAgentTel){
        getBrokers().then((res)=>{
          //暂时先分一个 后面再添加
          this.telInfo = 'tel:'+ res.data[0].brokerPhone
        })
      }else{
        this.telInfo = 'tel:'+ myAgentTel
      }
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
div{
  text-align: center;
}
button{
  font-size: 16px;
  width: 50%;
  margin: 5% auto;
}
.service{
  position: fixed;
  top: 70%;
  width: 16%;
  right: 0;
  z-index: 111;
}

.service img{
  width: 100%;
}

</style>
